//@author A0101056Y
//For developers, every time before running the integration test, 
//please do the following: 
//1. delete the TEConfig.txt in the project folder so as to make
//   sure all the date and time formats are default
//2. delete the TEDataFile.txt in the project folder so that to 
//   to empty all existed events; or you can comments out the 
//   readFile() and saveFile() in EventStorage
//End.


#include "stdafx.h"
#include "CppUnitTest.h"


using namespace Microsoft::VisualStudio::CppUnitTestFramework;

namespace LibraryTest
{		
	TEST_CLASS(OperationsTest)
	{
	public:

		//use operation type add
		TEST_METHOD(addEventsByKeywordTest)
		{
			string str = "add do math homework";
			string expOutput = "'do math homework' added successfully\r\n";

			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);

		}

		//not to use operation type "add"
		TEST_METHOD(addEventsWithNoKeywordTest)
		{
			string str = "eat a rabbit";
			string expOutput = "'eat a rabbit' added successfully\r\n";
			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		
		//add event with time
		TEST_METHOD(addEventsWithTimeTest)
		{
			string str = "add cs project meeting\\4/5/2014 from 8am to 9am";
			string expOutput = "'cs project meeting' added successfully\r\n";

			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		
		//add event with time and repeat rule
		TEST_METHOD(addEventsWithRepeatTimeTest)
		{
			string str = "add do bio homework\\4/5/2014\\\\every week";
			string expOutput = "'do bio homework' added successfully\r\n";

			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		
		//add event with time and tag
		TEST_METHOD(addEventsWithTimeNTagTest)
		{
			string str = "add do chem homework\\3/4/2014 8am\\\\\\study";
			string expOutput = "'do chem homework' added successfully\r\n";

			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		
		//add event with remind time
		TEST_METHOD(addEventsWithRemindTimeTest)
		{
			string str = "add see doctor\\9/5/2014 2pm\\9/5/2014 1:30pm\\\\hospital";
			string expOutput = "'see doctor' added successfully\r\n";

			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		
		//display all the events
		TEST_METHOD(searchAnythingTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting                        |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
															
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//clear everything on console screen
		TEST_METHOD(clearScreenTest)
		{
			string str = "clear";
			string expOutput = "";

			string actOutput;
			UserCommand newCommand;

			newCommand.analyse (str);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);

		}


		//search by description that does not exist
		TEST_METHOD(searchDescriptionNegativeTest){
			string userInput = "search people";
			string expOutput = "";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
			
		}

		//search by description that exists
		TEST_METHOD(searchDescriptionPostiveTest){
			string userInput = "search homework";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n";
								
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//search by Time
		TEST_METHOD(searchTimeTest){
			string userInput = "search \\4/5/2014";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |cs project meeting                        |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//search by tag
		TEST_METHOD(searchTagTest){
			string userInput = "search \\\\study";
			string expOutput = "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n";

			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//search by both description and time
		TEST_METHOD(searchDescAndTimeTest){
			string userInput = "search homework\\4/5/2014";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |cs project meeting                        |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//search by both description and tag
		TEST_METHOD(searchDescAndTagTest){
			string userInput = "search homework\\\\study";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
											
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//search by both time and tag
		TEST_METHOD(searchTimeAndTagTest){
			string userInput = "search \\4/5/2014\\study";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |cs project meeting                        |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//search by both description, time and tag
		TEST_METHOD(searchDescAndTimeAndTagTest){
			string userInput = "search project\\4/5/2014\\study";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |cs project meeting                        |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
												
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//delete a single event
		TEST_METHOD(DeleteOnePositiveTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
									
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "delete 3";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//delete multiple events
		TEST_METHOD(DeleteMultiplePositiveTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
									
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "delete 1-3,4";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//try to delete by an index more than the total number of events
		TEST_METHOD(DeleteNegativeTest){
			string userInput = "search";
			string expOutput =  "Invalid input of event's index. "
								"Please delete again.";
								
									
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "delete 10";
			newCommand.analyse (userInput2);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//undo one operation
		TEST_METHOD(undoOneTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "undo";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//undo many operations
		TEST_METHOD(undoMultipleTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting                        |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "undo 4";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit one event's description
		TEST_METHOD(editOneWithDescpTionTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do chem homework                          |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do bio homework                           |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 3\\cs project meeting with Calvin";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit multiple events' description at the same time
		TEST_METHOD(editMultipleWithDescriptionTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 08:00am 3/4/2014 Thursday    |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 1~2\\do cs post-lecture quiz";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit one event's time
		TEST_METHOD(editOneWithTimeTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 00:00am 4/5/2014 Sunday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 1\\\\10am 25/4/2014";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit multiple events' time at the same time
		TEST_METHOD(editMultipleWithTimeTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:30pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 1~2\\\\25/4/2014 10am";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit one event's remind time
		TEST_METHOD(editOneWithRemindTimeTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 4\\\\\\9/5/2014 1pm";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit one event's repeat rule
		TEST_METHOD(editOneWithRepeatRuleTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 3 days                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 1\\\\\\\\every 3 days";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		
		//edit multiple events' repeat rule at the same time
		TEST_METHOD(editMultipleWithRepeatRuleTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: study                                                                   |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "modify 1,3\\\\\\\\everyday";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit one event's tag
		TEST_METHOD(editOneWithTagTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs quiz                                                                 |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "change 2\\\\\\\\\\cs quiz";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		
		//edit many events' tags at the same time
		TEST_METHOD(editMultipleWithTagsTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "change 1-3\\\\\\\\\\cs";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//edit one event with many attributes
		TEST_METHOD(editManyAttributesTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "change 1\\visit grandma\\26/4/2014 6pm\\26/4/2014 5pm\\every week\\home";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark an event is done
		TEST_METHOD(markOneIsDoneTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 2\\done";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark many events are done
		TEST_METHOD(markManyAreDoneTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 5-6\\done";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark an event is reminded
		TEST_METHOD(markOneIsRemindedTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Reminded                 |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 1\\reminded";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark many event are reminded
		TEST_METHOD(markManyAreRemindedTest){
			string userInput = "search";
			string expOutput = "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Reminded                 |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 5,6\\reminded";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark an event is missed
		TEST_METHOD(markOneIsMissedTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Reminded                 |Missed                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 1\\missed";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark many events are missed
		TEST_METHOD(markManyAreMissedTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Reminded                 |Missed                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Missed                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Missed                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 3-4\\missed";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark an event with many filters
		TEST_METHOD(markOneWIthManyFiltersTest){
			string userInput = "search";
			string expOutput = "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Missed                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Missed                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 1\\not missed\\not reminded";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		//mark many events' with many filters
		TEST_METHOD(markManyWIthManyFiltersTest){
			string userInput = "search";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 25/4/2014 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 26/4/2014 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 26/4/2014 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 4/5/2014 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 4/5/2014 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 9/5/2014 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 9/5/2014 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "mark 3-4\\not missed\\reminded\\done";
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "display";
			newCommand.analyse (userInput3);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}

		
		//change the date format
		TEST_METHOD(configDateFormatTest){
			string userInput = "config";
			string expOutput =  "1.*==============================================================================*\r\n"
								"  |do cs post-lecture quiz                   |Time: 10:00am 2014/4/25 Friday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Not done                |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"2.*==============================================================================*\r\n"
								"  |visit grandma                             |Time: 06:00pm 2014/4/26 Saturday   |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every 7 days                              |Remind: 05:00pm 2014/4/26 Saturday |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Not reminded             |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: home                                                                    |\r\n"
								"  *==============================================================================*\r\n"
								"3.*==============================================================================*\r\n"
								"  |cs project meeting with Calvin            |Start: 08:00am 2014/5/4 Sunday     |\r\n"
								"  |                                          |End  : 09:00am 2014/5/4 Sunday     |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |every day                                 |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: cs                                                                      |\r\n"
								"  *==============================================================================*\r\n"
								"4.*==============================================================================*\r\n"
								"  |see doctor                                |Time: 02:00pm 2014/5/9 Friday      |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |Remind: 01:00pm 2014/5/9 Friday    |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Tags: hospital                                                                |\r\n"
								"  *==============================================================================*\r\n"
								"5.*==============================================================================*\r\n"
								"  |do math homework                          |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n"
								"6.*==============================================================================*\r\n"
								"  |eat a rabbit                              |Time: NO TIME FOUND                |\r\n"
								"  |------------------------------------------+-----------------------------------|\r\n"
								"  |NEVER repeat                              |NO remind time                     |\r\n"
								"  |------------------------------------------------------------------------------|\r\n"
								"  |Done                    |Reminded                 |Not Missed                 |\r\n"
								"  *==============================================================================*\r\n";
								
			string actOutput;
			UserCommand newCommand;
			newCommand.analyse (userInput);
			OutputDisplay::get().getUpcomingText();
			string userInput2 = "1";//1 for change the date format
			newCommand.analyse (userInput2);
			OutputDisplay::get().getUpcomingText();
			string userInput3 = "2";//2 for YYYYMMDD format
			newCommand.analyse (userInput3);
			OutputDisplay::get().getUpcomingText();
			string userInput4 = "q"; //random input to exit config mode
			newCommand.analyse (userInput4);
			OutputDisplay::get().getUpcomingText();
			string userInput5 = "display";
			newCommand.analyse (userInput5);
			actOutput = OutputDisplay::get().getUpcomingText();
			Assert::AreEqual(actOutput, expOutput);
		}
		

	};
};